<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ include file="/static/commons/taglibs.jsp"%>
<%@ include file="/static/commons/meta.jsp"%>
<%@ include file="/static/commons/ecside.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
	<link rel="stylesheet" href="${ctx }/static/styles/edit/tableStyle.css"></link>
</head>
<body>
	<table class="table-utd" width="100%">
		<thead>
			<tr>
				<td align="center">序号</td>
				<td align="center">类型</td>
				<td align="center">数量</td>
				<td align="center">操作</td>
			</tr>
		<thead>
		<tbody>
			<tr>
				<td align="center">1</td>
				<td align="center">检测</td>
				<td align="center">${obj.checkNum>0?obj.checkNum:0}</td>
				<td align="center"><input type="button" value="分配" onclick="taskAssign(${obj.checkNum>0?obj.checkNum:0},1)"></input></td>
			</tr>
			<tr>
				<td align="center">2</td>
				<td align="center">维修</td>
				<td align="center">${obj.repairNum>0?obj.repairNum:0}</td>
				<td align="center"><input type="button" onclick="taskAssign(${obj.repairNum>0?obj.repairNum:0},2)" value="分配"></input></td>
			</tr>
		</tbody>
	</table>
</body>
<script type="text/javascript">
	var pp = parent;
	function taskAssign(num,type) {
		if(num==0){
			 pp.$.messager.alert('操作提示','暂无任务分配','warning',function(){
				 	
			 });
		}else{
			if(type==1){   // 分配
				pp.addTab("检测任务分配","${ctx}/taskAssign/init?orderType=1&menuId=03.03.01","03.03.01");
			}else{
				pp.addTab("维修任务分配","${ctx}/taskAssign/init?orderType=2&menuId=03.03.02","03.03.02");
			}
		} 
	}
</script>
</html>